#!/bin/bash

set -o errexit

echo "#5 entrypoint-build.sh start in docker"

pwd && whoami

java -version
mvn -v

pwd && ls -alh

cd /www/image-combiner

pwd
ls -alh

# 编译打包
mvn clean install \
    -U \
    -e \
    -Dmaven.test.skip=true \
    -Dmaven.compile.fork=true \
    -Dmaven.compiler.debug=true \
    -Dmaven.compiler.debuglevel=lines,vars,source \

pwd && ls -alh

cd target && pwd && ls -alh

# 上传
mvn deploy:deploy-file \
    -Durl=http://192.168.0.31:8081/repository/maven-snapshots/ \
    -DrepositoryId=budo-snapshot-repository \
    -DgroupId=com.freeway \
    -DartifactId=image-combiner \
    -Dversion=1.2.0-SNAPSHOT \
    -Dfile=image-combiner-1.2.0.jar

echo "#30 entrypoint-build.sh, done in docker"
